package org.jeecg.modules.charge.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.entity.charge.ChargeDiscount;
import org.jeecg.modules.charge.mapper.ChargeDiscountMapper;
import org.jeecg.modules.charge.service.IChargeDiscountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 缴费优惠规则
 * @Author: jeecg-boot
 * @Date:   2021-01-06
 * @Version: V1.0
 */
@Service
public class ChargeDiscountServiceImpl extends ServiceImpl<ChargeDiscountMapper, ChargeDiscount> implements IChargeDiscountService {

    @Autowired
    private ChargeDiscountMapper chargeDiscountMapper;

    @Override
    public List<ChargeDiscount> findPage(Page<ChargeDiscount> page, ChargeDiscount chargeDiscount) {
        return chargeDiscountMapper.findPage(page, chargeDiscount);
    }

    @Override
    public Integer isBind(String projectId, String feeId) {
        return chargeDiscountMapper.isBind(projectId, feeId);
    }

    @Override
    public ChargeDiscount getDiscount(ChargeDiscount chargeDiscount) {
        return chargeDiscountMapper.getDiscount(chargeDiscount);
    }
}
